Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sys/xtimer: improve documentation #19681

Merged
merged 1 commit into from
May 30, 2023
Merged

Conversation

maribu
Copy link
Member

@maribu maribu commented May 30, 2023

Contribution description

  • Add a warning that xtimer is deprecated, so that new code hopefully starts using ztimer
  • Add a hint that ztimer_xtimer_compat can be used even after xtimer is gone

Testing procedure

Read the doc preview generated by the CI.

Issues/PRs references

Fixes #19667

@maribu maribu added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: doc Area: Documentation CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs labels May 30, 2023
@github-actions github-actions bot added Area: sys Area: System Area: timers Area: timer subsystems and removed Area: doc Area: Documentation labels May 30, 2023
@benpicco benpicco requested a review from kaspar030 May 30, 2023 13:03
@riot-ci
Copy link

riot-ci commented May 30, 2023

Murdock results

✔️ PASSED

9454a50 sys/xtimer: improve documentation

Success Failures Total Runtime
1 0 1 52s

Artifacts

Copy link
Contributor

@kaspar030 kaspar030 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK.

@maribu
Copy link
Member Author

maribu commented May 30, 2023

bors merge

bors bot added a commit that referenced this pull request May 30, 2023
19677: boards/nucleo-l432k: provide three periph_timer instances r=maribu a=maribu

### Contribution description

- `cpu/stm32/periph_timer`: Generalize to also work with timers that do not have 4 channels
- `boards/common/stm32`: Add timer config for three timers based on TIM2, TIM15, and TIM16 (the three general-purpose timers of the STM32L4)
- `boards/nucleo-l432kc`: Make use of the new timer config


19681: sys/xtimer: improve documentation r=maribu a=maribu

### Contribution description

- Add a warning that xtimer is deprecated, so that new code hopefully starts using ztimer
- Add a hint that `ztimer_xtimer_compat` can be used even after `xtimer` is gone


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
@bors
Copy link
Contributor

bors bot commented May 30, 2023

This PR was included in a batch that was canceled, it will be automatically retried

bors bot added a commit that referenced this pull request May 30, 2023
19677: boards/nucleo-l432k: provide three periph_timer instances r=maribu a=maribu

### Contribution description

- `cpu/stm32/periph_timer`: Generalize to also work with timers that do not have 4 channels
- `boards/common/stm32`: Add timer config for three timers based on TIM2, TIM15, and TIM16 (the three general-purpose timers of the STM32L4)
- `boards/nucleo-l432kc`: Make use of the new timer config


19678: gnrc_sixlowpan_iphc: fix NULL pointer dereference r=maribu a=miri64



19681: sys/xtimer: improve documentation r=maribu a=maribu

### Contribution description

- Add a warning that xtimer is deprecated, so that new code hopefully starts using ztimer
- Add a hint that `ztimer_xtimer_compat` can be used even after `xtimer` is gone


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
@bors
Copy link
Contributor

bors bot commented May 30, 2023

Build failed (retrying...):

*
* The implementation takes one low-level timer and multiplexes it.
*
* Insertion and removal of timers has O(n) complexity with (n) being the
* number of active timers. The reason for this is that multiplexing is
* realized by next-first singly linked lists.
*
* @warning xtimer has been deprecated in favor of the @ref sys_ztimer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the @deprecated command?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way it will show up in https://doc.riot-os.org/deprecated.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

- Add a deprecation note to xtimer, so that new code hopefully
  starts using ztimer
- Add a hint that `ztimer_xtimer_compat` can be used even after `xtimer`
  is gone
@maribu maribu force-pushed the xtimer_documentation branch from 4333ed7 to 9454a50 Compare May 30, 2023 15:33
@bors
Copy link
Contributor

bors bot commented May 30, 2023

Canceled.

@maribu
Copy link
Member Author

maribu commented May 30, 2023

bors merge

bors bot added a commit that referenced this pull request May 30, 2023
19610: drivers/periph/rtc: improve doc on rtc_set_alarm r=maribu a=maribu

### Contribution description

- point out behavior on denormalized time stamps
- use errno codes to indicate errors (and adapt the few instances of actual error handling to use them)


19670: cpu/stm32: stm32f4 BRR from BSRR r=maribu a=kfessel

### Contribution description

sometimes one wants to save one instruction :) 
just write the bits we need to write.

### Testing procedure

tests/periph/gpio_ll tests this 

### Issues/PRs references

`@maribu` might know some reference

maybe #19407

19678: gnrc_sixlowpan_iphc: fix NULL pointer dereference r=maribu a=miri64



19679: gnrc_sixlowpan_frag_sfr: fix ARQ scheduler race-condition r=maribu a=miri64



19680: gnrc_sixlowpan_frag_rb: fix OOB write in _rbuf_add r=maribu a=miri64



19681: sys/xtimer: improve documentation r=maribu a=maribu

### Contribution description

- Add a warning that xtimer is deprecated, so that new code hopefully starts using ztimer
- Add a hint that `ztimer_xtimer_compat` can be used even after `xtimer` is gone


Co-authored-by: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
Co-authored-by: Karl Fessel <karl.fessel@ovgu.de>
Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
@maribu
Copy link
Member Author

maribu commented May 30, 2023

bors cancel
bors merge

@bors
Copy link
Contributor

bors bot commented May 30, 2023

Canceled.

@bors
Copy link
Contributor

bors bot commented May 30, 2023

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot merged commit 00b5bc1 into RIOT-OS:master May 30, 2023
@miri64
Copy link
Member

miri64 commented May 30, 2023

Fixes #19667

This did not fix #19667. I explain there.

@miri64
Copy link
Member

miri64 commented May 30, 2023

Nevermind, did not realize doc.riot-os.org was still in the old state.

@maribu maribu deleted the xtimer_documentation branch May 30, 2023 20:50
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System Area: timers Area: timer subsystems CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated documentation?
5 participants